package com.itheima;

/**
 * 2025/5/12 20:35
 */
public class InnerClassDemo {
    public static void main(String[] args) {
        //创建成员内部类对象
        Outer.Inner inner = new Outer().new Inner();
        inner.show();

        Outer.Inner2 inner2 = new Outer.Inner2();
        inner2.show();

        class A{

        }

        abstract class B{}

        interface C{}

        new A();

        System.out.println("-------------------");

        Socket socket = new Socket() {
            @Override
            public void supply() {
                System.out.println(" supply");
            }

            @Override
            public void turnOn() {
                System.out.println(" turnOn");
            }

            @Override
            public void turnOff() {
                System.out.println(" turnOff");
            }
        };

        socket.turnOn();
        socket.supply();
        socket.turnOff();

    }
}
